using System;
using Server;
using Server.Network;

namespace Server.Items
{
    [Flipable(0xFBD, 0xFBE)]
    public class SherryTheMouseQuotes : BaseStatuette
    {
        public override int LabelNumber { get { return 1073300; } } // Library Friends - Quotes from the pen of Sherry the Mouse

        [Constructable]
        public SherryTheMouseQuotes(): base(0xFBD)
        {
            LootType = LootType.Blessed;
            Weight = 5.0;
        }

        public SherryTheMouseQuotes(Serial serial): base(serial)
        {
        }

        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
            {
                PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.RandomMinMax(1073301, 1073309));

                if (Utility.RandomBool())
                    Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x30A, 0x313));
                else
                    Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x419, 0x422));

            }

            base.OnMovement(m, oldLocation);
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }
    }
}